
/*
 * Hlpay-Plus aggregate payment system.
 * Copyright (c) 2024-2025 Hlpay Team Copyright has the right of final interpretation.
 */

package com.hlkj.pay.app.merchant.ext;

import javax.servlet.http.HttpServletRequest;

import com.hlkj.framework.common.pojo.CommonResult;
import com.hlkj.framework.extension.ExtensionPointI;
import com.hlkj.pay.app.merchant.ext.dto.payment.ChannelPaymentAccountContext;
import com.hlkj.pay.app.merchant.ext.dto.payment.ChannelPaymentCallBackContext;
import com.hlkj.pay.app.merchant.ext.dto.payment.ChannelPaymentCallBackDto;
import com.hlkj.pay.app.merchant.ext.dto.payment.ChannelPaymentContext;
import com.hlkj.pay.infrastructure.model.merchant.MerchantAppChannelDO;
import com.hlkj.pay.infrastructure.model.pay.ProviderChannelConfigDO;

/**
 * 商户付款
 * 
 * @author HlpayTeam
 * @date 2024/09/12 11:39
 */
public interface ChannelMerchantPaymentExtPt extends ExtensionPointI {

    /**
     * 提交渠道代付-单笔
     * 
     * @param channelPayOrderContext
     */
    void submitChannelSinglePayment(ChannelPaymentContext channelPayOrderContext);

    /**
     * 查询代付
     *
     * @param channelPayOrderContext
     */
    void queryChannelPayment(ChannelPaymentContext channelPayOrderContext);

    /**
     * 查询代付
     *
     * @param channelPaymentAccountContext
     */
    void queryChannelAccount(ChannelPaymentAccountContext channelPaymentAccountContext);

    /**
     * 查询代付凭证
     *
     * @param channelPayOrderContext
     */
    void queryChannelPaymentProof(ChannelPaymentContext channelPayOrderContext);

    /**
     * 
     * @param merchantAppChannelDO
     * @param accessCallBody
     * @return
     */
    ChannelPaymentCallBackDto parseCallBackText(ChannelPaymentCallBackContext channelPaymentCallBackContext, HttpServletRequest accessCallBody);
    /**
     *
     * @param accessCallBody
     * @return
     */
    ChannelPaymentCallBackDto parseCallBackTextFix(HttpServletRequest accessCallBody);

    /**
     * 
     * @param merchantAppChannelDO
     * @param callParams
     * @return
     */
    String processCallBack(MerchantAppChannelDO merchantAppChannelDO, CommonResult commonResult);

    /**
     *
     * @param merchantAppChannelDO
     * @param accessCallBody
     * @return
     */
    Boolean verify(ProviderChannelConfigDO providerChannelConfigDO, MerchantAppChannelDO merchantAppChannelDO,String accessCallBody);

    /**
     *
     * @param channelPaymentContext
     */
    void notifyChannel(ChannelPaymentContext channelPaymentContext);

    /**
     *
     * @param channelPaymentContext
     */
    void submitChannelSingleRecharge(ChannelPaymentContext channelPaymentContext);

    /**
     *
     * @param channelPaymentContext
     */
    void notifyProofGenerate(ChannelPaymentContext channelPaymentContext);
}
